
package com.be.beadmin.product.repository;

import com.be.beadmin.product.entity.WorkHoursRequest;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
* @author ljh
* @date 2023-04-18
**/
public interface WorkHoursRequestRepository extends JpaRepository<WorkHoursRequest, String>, JpaSpecificationExecutor<WorkHoursRequest> {

    WorkHoursRequest findWorkHoursRequestByIdAndDelete(String id, Integer delete);

    WorkHoursRequest findWorkHoursRequestById(String id);


    @Query(value = "select stand_manufact_workhour from t_om_work_hours_request where wo = ?1 and is_delete=0", nativeQuery = true)
    List<Float> getHours(String wo);
}